package com.estar.assistsurvy.thread;

import com.estar.assistsurvy.constant.Constants;
import com.estar.assistsurvy.entity.RequestWalletChange;
import com.estar.assistsurvy.entity.ResponseBankCardInfo;

import android.content.Context;
import android.os.Handler;
import android.util.Log;

public class BankInfoThread extends BaseThread {

	private RequestWalletChange bankInfo;

	public BankInfoThread(Context context, Handler handler, RequestWalletChange bankInfo) {
		super(context, handler);
		this.bankInfo = bankInfo;
	}
	
	@Override
	public void run() {
		// TODO Auto-generated method stub
		url_str=Constants.NAMESPACE+Constants.BANKINFO;
		json=gson.toJson(bankInfo);
		postRequest(url_str, json);
		if(result!=null){
			Log.i("wl", "请求银行卡返回值"+result);
			ResponseBankCardInfo bankCard=new ResponseBankCardInfo();
			bankCard=gson.fromJson(result, ResponseBankCardInfo.class);
			msg.what=0;
			msg.obj=bankCard;
			msg.sendToTarget();
		}
	}
}
